<?php
/**
 * Unfuddle Changeset Model
 * Repository changesets
 *
 * @package     Unfuddle
 * @subpackage  Data Models
 * @author      Luke Visinoni <luke.visinoni@gmail.com>
 * @copyright   (c) 2010 Luke Visinoni <luke.visinoni@gmail.com>
 * @version     $Id: Changeset.php 27 2011-01-15 10:33:26Z luke.visinoni $
 */
class Unfuddle_Model_Changeset extends Unfuddle_Model_Abstract {

    protected $_name = 'changeset';
    
    protected $_fields = array (
        /**
         * Note that not all repositories systems distinguish between
         * the author and committer (i.e. Subversion does not)
         */
        'author-id' => array('type' => 'integer', 'required' => false, 'read-only' => false),
        'author-name' => array('type' => 'text', 'required' => false, 'read-only' => false),
        'author-email' => array('type' => 'text', 'required' => false, 'read-only' => false),
        'author-date' => array('type' => 'datetime', 'required' => false, 'read-only' => false), // the date the patch was authored
        'committer-id' => array('type' => 'integer', 'required' => false, 'read-only' => false),
        'committer-name' => array('type' => 'text', 'required' => false, 'read-only' => false),
        'committer-email' => array('type' => 'text', 'required' => false, 'read-only' => false),
        'committer-date' => array('type' => 'datetime', 'required' => false, 'read-only' => false), // the date the patch was committed
        'created-at' => array('type' => 'datetime', 'required' => false, 'read-only' => false),
        'id' => array('type' => 'integer', 'required' => false, 'read-only' => true),
        'message' => array('type' => 'text', 'required' => false, 'read-only' => false),
        'message-formatted' => array('type' => 'text', 'required' => false, 'read-only' => true), // only available if formatted=true
        'repository-id' => array('type' => 'integer', 'required' => false, 'read-only' => true),
        'revision' => array('type' => 'text', 'required' => false, 'read-only' => false),
    );

}